import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './App';
import goods from './components/goods/goods';
import ratings from './components/ratings/ratings';
import seller from './components/seller/seller';
import axios from 'axios'   ;

Vue.prototype.$http = axios 
Vue.use(VueRouter);

const routes = [{
  path: '/',
  redirect: '/goods'
}, {
  path: '/goods',
  component: goods
}, {
  path: '/ratings',
  component: ratings
}, {
  path: '/seller',
  component: seller
}]; 
const router = new VueRouter({  
    linkActiveClass: 'active',  
    routes: routes               //是routes: xxx,而不是routers  
});  
/* eslint-disable no-new */  
new Vue({
  el: '#app',
  router,
  render: h => h(App)
});

  